/*     */ package com.infoservice.schedule;
/*     */ 
/*     */ import com.infoservice.po3.POFactory;
/*     */ import com.infoservice.po3.POFactoryBuilder;
/*     */ import com.infoservice.po3.core.context.DBService;
/*     */ import java.util.Date;
/*     */ import java.util.Map;
/*     */ 
/*     */ public abstract class Task
/*     */ {
/*  29 */   private Map<String, String> params = null;
/*  30 */   private Date planExcDate = null;
/*  31 */   private int duration = -1;
/*  32 */   private String txnName = null;
/*  33 */   private String dbName = null;
/*  34 */   private boolean sysControlTxn = true;
/*  35 */   private int errorStackLenth = 4000;
/*     */ 
/*     */   public int getDuration()
/*     */   {
/*  43 */     return this.duration;
/*     */   }
/*     */ 
/*     */   public void setDuration(int duration)
/*     */   {
/*  51 */     this.duration = duration;
/*     */   }
/*     */ 
/*     */   public POFactory getPOFactory(String txnName, String dbName)
/*     */   {
/*  62 */     this.txnName = (txnName == null ? DBService.getInstance().getDefTxnManager() : txnName);
/*  63 */     this.dbName = (dbName == null ? DBService.getInstance().getDefDataSource() : dbName);
/*     */ 
/*  65 */     return POFactoryBuilder.getInstance(this.dbName, this.txnName, getDuration());
/*     */   }
/*     */ 
/*     */   public Date getPlanExcDate()
/*     */   {
/*  74 */     return this.planExcDate;
/*     */   }
/*     */ 
/*     */   public void setPlanExcDate(Date planExcDate)
/*     */   {
/*  82 */     this.planExcDate = planExcDate;
/*     */   }
/*     */ 
/*     */   public void setParams(Map<String, String> params)
/*     */   {
/*  90 */     this.params = params;
/*     */   }
/*     */ 
/*     */   public String getParam(String key)
/*     */   {
/*  99 */     if (this.params == null) {
/* 100 */       return null;
/*     */     }
/* 102 */     return (String)this.params.get(key);
/*     */   }
/*     */ 
/*     */   public final String getTxnName() {
/* 106 */     return this.txnName;
/*     */   }
/*     */   public final String getDbName() {
/* 109 */     return this.dbName;
/*     */   }
/*     */ 
/*     */   public final boolean isSysControlTxn()
/*     */   {
/* 116 */     return this.sysControlTxn;
/*     */   }
/*     */ 
/*     */   public final void setSysControlTxn(boolean sysControlTxn)
/*     */   {
/* 123 */     this.sysControlTxn = sysControlTxn;
/*     */   }
/*     */ 
/*     */   public final int getErrorStackLenth()
/*     */   {
/* 132 */     return this.errorStackLenth;
/*     */   }
/*     */ 
/*     */   public final void setErrorStackLenth(int errorStackLenth)
/*     */   {
/* 140 */     this.errorStackLenth = errorStackLenth;
/*     */   }
/*     */ 
/*     */   public abstract String execute();
/*     */ }

/* Location:           D:\Workspace\Work\ASMP_DE\lib\frame3\InfoSchedule_1.0.03.jar
 * Qualified Name:     com.infoservice.schedule.Task
 * JD-Core Version:    0.6.0
 */